@BEGINEVENTS

@IF
SCENARIOLOADED
@THEN
PLAYWAVEFILE
MUSIC.WAV
DONTPLAYWONDERS
@ENDIF

@IF
TURN
turn=0
@THEN
TEXT
^^Dungeon:  Heroes of Beckhorn
^^Version 3.1 - By Blackclove
^
^Special thanks to Wizard for his helpful suggestions regarding an earlier
version of this scenario. Thanks also to Gothmog and Mr. Temba for helpful suggestions
and to Erwan for his art.  Some sound effects were borrowed from Shannara and Underdark.
ENDTEXT
@ENDIF

@IF
TURN
turn=0
@THEN
TEXT
^^Messenger Arrives
^
^Disturbing news, oh king!  Monsters from the great dungeons at the edges of the kingdom
threaten Beckhorn.  Our only hope is to send out a plea for help to our neighbors and hope that
they send heroes.  Three great heroes of our realm, Jahdam the spear-saint, Judge Roland the
town justiciar, and Redwind the barbarian huntsman have agreed to serve us already.
^
^Jahdam is recuperating from wounds in the inn outside of Veii (she's sleeping).
^
^[Jahdam:  12/4/3, f2/h6, x4 Move, Climb Walls]
^[Roland: 6/6/3, f2/h3, x4 Move, Resist Magic]
^[Redwind: 7/7/3, f2/h3]
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Jahdam
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Jahdam the Spear-Saint Dies of Her Wounds
^
^The king declares this day a day of mourning.  The bells ring out
in the great cathedral in memory of the heroine who gave her life
protecting the people.  Her spear is returned to Beckhorn by a 
recruit and is given a place of honor in the castle.
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Judge Roland
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Judge Roland Eaten Alive
^
^Sadly, the mighty justiciar's armor could not protect him from his
tragic end.  Goblin soldiers, practicing their wicked craft, managed
to somehow shrink his head and sew the mouth shut, moustache still
intact.  His remains are buried beneath a statue carved by the 
dwarves to honor their long-time friend.
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Redwind
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Redwind Dies
^
^One of the original heroes of Beckhorn, Redwind was known for his
ability to track virtually any prey.  Unfortunately, this time something
has tracked him.  No trace is ever found of him, but word comes from an
escaped prisoner that they saw his body being used for target practice
by monsters.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=6
receiver=Beckians
@THEN
TEXT
^^Messenger from Westmark
^
^The wizards of Westmark agree to help, and send the mage Gaevan Madera to our aid.
Madera is a young wizard, but the mages promise further help if our magical discoveries
can aid them in their research.
^[Gaevan:  1/2/3, f1/h2, spells]
ENDTEXT
CREATEUNIT
unit=Gaevan Madera
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
37,132
35,132
36,131
36,133
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Gaevan Madera
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Westmark Said to Be Enraged at Death of Novice Mage
^
^The body of the young wizard Gaevan Madera was found, still in his
green robes, in the lair of a giant spider.  The body has been returned
to the wizards of Westmark for proper burial.
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Omarus Phaesor
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Westmark Threatens War Over Wizard's Death
^
^The well-known wizard Omarus Phaesor died of unknown causes while
exploring the dungeons beneath our land.  The wizards of Westmark
immediately begin sabre-rattling, claiming that with proper fighter
escort Omarus would never have died.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=22
receiver=Beckians
@THEN
TEXT
^^Necromancer's Redemption
^
^Hearing of our powerful spells, the necromancer Clarisse agrees to join our cause.  "I have made
many wrong decisions, but now I am making the right one."  [Clarisse:  5/4/5, f2/h2, spells]
ENDTEXT
CREATEUNIT
unit=Clarisse
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Clarisse
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Clarisse Buried in Cathedral Cemetary
^
^To the last, Clarisse never believed she atoned for her sins against
the people of the land, but the people knew better.  Her body was 
recovered from a forsaken temple by wandering gnomes and carried to
the cathedral, where it was blessed with holy water and received the
gods' benedictions.
^
^Her service to our people will never be forgotten.
ENDTEXT
@ENDIF

@IF
NOSCHISM
defender=ANYBODY
@THEN
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=19
receiver=Beckians
@THEN
TEXT
^^Lure of Mighty Magic Attracts Powerful Sorceror
^
^We have discovered spells even the mages of Westmark know nothing of, thanks to treasures
brought back from the dungeons.  Hearing of this, the mighty sorceror Omarus Phaesor pledges
himself to our cause.  [Omarus:  3/6/3, f3/h2, spells, teleportation, seer/sees2, magic resistant,
veteran]
ENDTEXT
CREATEUNIT
unit=Omarus Phaesor
owner=Beckians
veteran=yes
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=87
receiver=Beckians
@THEN
TEXT
^^Antinat Joins the Guard
^
^One of the men signing up to train as a guard proves to be much more -- Antinat, one of the
strongest and fastest warriors in the world.  [Antinat:  8/8/6, f2/h6, magic resistant]
ENDTEXT
CREATEUNIT
unit=Antinat
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Antinat
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Antinat Declared a Saint
^
^The mighty warrior Antinat died from massive injuries sustained during
battle.  Peasants are said to have carried him, each of them weeping,
to the great cathedral.  His legacy of kindness and generosity towards
the simple people will never be forgotten.  His sword has been kept as
a relic and he has been sainted.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=25
receiver=Beckians
@THEN
TEXT
^^Livia Blood-Ice Hired for 100 Gold
^
^The call for mercenaries reaches the farthest corners of the known world.  Among those who
respond is the mighty ranger Livia Blood-Ice of the Northern Marches, owner of the Shield of
Celerity.  No one alive can run as fast as she can.  [Livia:  6/6/12, f2/h5, x4 Move]
ENDTEXT
CREATEUNIT
unit=Livia Bloodice
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
CHANGEMONEY
receiver=Beckians
amount=-100
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Livia Bloodice
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Livia Mourned Despite Heart of Ice
^
^The death of the ranger Livia Blood-Ice came as a shock to the people
of Beckhorn.  Though never loved, and widely known as a drinker, brawler,
gambler and cheat, her might was unquestioned.  For her services to 
Beckhorn, her debts were all assumed by the monarchy.  [50 gp lost]
ENDTEXT
CHANGEMONEY
receiver=Beckians
amount=-50
JUSTONCE
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=74
receiver=Beckians
@THEN
TEXT
^^Knights of Beckhorn Founded
^^Sir Noteworthy III Assumes Command
^
^With the founding of the great Knights of Beckhorn comes the world-reknowned knight who
survived the orcish wars in the south, Sir Noteworthy III, saying, "I shall not rest until the last orc
has fallen before my blade."  [Noteworthy:  8/8/2, f2/h6, resist magic, x4 Move, veteran]
ENDTEXT
CREATEUNIT
unit=Noteworthy III
owner=Beckians
veteran=yes
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Noteworthy III
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Noteworthy Dies, But His Legacy Lives On
^
^Noteworthy III, commander of the Knights of Beckhorn, died in battle.
His courage and might were an inspiration to us all.  Upon his death,
a squire discovered a scroll in his quarters donating his life's savings
to continuing the battle against evil in Beckhorn.  [+50 Gold!]
ENDTEXT
CHANGEMONEY
receiver=Beckians
amount=50
JUSTONCE
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=36
receiver=Beckians
@THEN
TEXT
^^Miners' League Organizes to Return to Work
^
^With the formation of the miner's league, the legendary miner Dech Woot agrees to join your
cause.  "All my life I have sought to bring my fellow workers together.  After this struggle is over, I
hope that our lot in life can be improved."  [Dech:  2/4/6, f2/h2, magic resistant, x4 move,
teleport, stealthy]
ENDTEXT
CREATEUNIT
unit=Dech Woot
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Dech Woot
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Dech Woot Vanishes
^
^The leader of the miner's guild, Dech Woot, was seen to be struck by
a monster and then simply vanished into thin air.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=45
receiver=Beckians
@THEN
TEXT
^^Thieves Say "Monsters Are Bad For Business"
^^Send Surprise Aid to the King!
^
^A secret thieves' guild is located somewhere in our city.  Their black market operations, though
criminal, would be greatly disrupted were our kingdom to fall.  The guildmaster, Zjorz th'Knife,
whose deadly poisonous knife made him infamous, agrees to help.  Who are we to refuse?
[Zjorz:  5/4/4, fp30/h3, stealthy]
ENDTEXT
CREATEUNIT
unit=Zjorz th'Knife
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Zjorz th'Knife
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Thieves' Guild Dispersed
^
^Riots in the streets followed a rash of violent attacks upon prominent
Beckhorn citizens.  The blame has been placed on the thieves' guild, 
who without their leader have fallen to squabbling amongst themselves.
The gang wars are finally stopped decisively by the kings' guards, who
round up and kill or imprison over two dozen local bosses.  The guild
will never be the same again.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=81
receiver=Beckians
@THEN
TEXT
^^Elven Heroine Pledges Her Longbow to Battle Evil
^
^The elven alliance proves helpful indeed.  The greatest heroine of the elves, Egri Deltan the archer,
has joined your cause.  Her swiftness and her deadly aim will save us many times over.  [Egri:
12/3/5, f3/h3, x4 move, stealthy]
ENDTEXT
CREATEUNIT
unit=Egri Deltan
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Egri Deltan
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Elven Heroine Returned to the Trees
^
^Egri Deltan was terribly wounded fighting for our defense.  Her aid,
a symbol of the elven commitment to saving Beckhorn, has not been
forgotten by the people.  The elven people are touched by the huge
pilgrimage of Beckhorn's citizens to visit her grave site -- a trip
many of these grateful people will make every year until they die
to honor the elfmaid.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=65
receiver=Beckians
@THEN
TEXT
^^Pleas for Aid Are Answered!
^
^Our plea for aid goes out to the neighboring kingdoms.  Among those to respond favorably are
the elves, the dwarves, and the wizards of Westmark.  Each say that an alliance is not out of the
question.  Best of all, the elves send the famed scout Thurin Leaflover as an immediate aid against
the monsters.  [Thurin:  9/2/4, f2/h4, x4 move, stealthy]
ENDTEXT
CREATEUNIT
unit=Thurin the Elf
owner=Beckians
veteran=no
homecity=NONE
locations
36,132
endlocations
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Thurin the Elf
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Thurin Leaflover Carried Back to His People's Homeland
^
^The scout Thurin Leaflover was slain by monsters, but his body was
returned to Beckhorn where grateful citizens carried it aloft for
eight days towards the elven forests.  Along the way, people showered
his body with wildflowers.
ENDTEXT
@ENDIF

@IF
RECEIVEDTECHNOLOGY
technology=99
receiver=Beckians
@THEN
JUSTONCE
TEXT
^^Paladin Order of St. Doyhozs Founded
^
^The great cathedral of Beckhorn's bells ring out in the streets
as our first paladins are trained.  These holy warriors surpass
even our knights in their desire to purge the world of evil --
and in skill, as well.
ENDTEXT
@ENDIF

@IF
NEGOTIATION
talker=ANYBODY
talkertype=HumanOrComputer
listener=ANYBODY
listenertype=HumanOrComputer
@THEN
@ENDIF

@IF
UNITKILLED
unit=Captive
attacker=Beckians
defender=ANYBODY
@THEN
TEXT
"My thanks for freeing me.  It's been a month since I was brought
here. My name is Mjollin, and I am a grey wizard of Westmark."  The mage bows deeply.  "The
great dragon captured me because I discovered his secret -- he can be slain in two ways, either
directly or by destroying his Heart, which is hidden in his hoard.  Beware, for his strength is great,
and a direct attack is certain to result in many deaths.  Your best bet is to send a fast warrior to
destroy his lair."  With that, he vanishes in a puff of smoke!
ENDTEXT
GIVETECHNOLOGY
receiver=TRIGGERATTACKER
technology=6
@ENDIF

@IF
UNITKILLED
unit=Damsel
attacker=Beckians
defender=ANYBODY
@THEN
TEXT
You release the woman from her chains.  "Thank you, adventurers.  I am Nema, the sister to
the Paladin-General of Westmark.  Because of my capture, she has not been able to send aid,
but now..."  Her eyes glint in the torchlight.  "You may be certain that she will open
negotiations with your forces against the darkness.  Farewell, adventurers!  And good luck!"
ENDTEXT
GIVETECHNOLOGY
receiver=Beckians
technology=98
@ENDIF

@IF
UNITKILLED
unit=Treasure
attacker=Beckians
defender=ANYBODY
@THEN
TEXT
You find 50 gold inside of the chest!
ENDTEXT
CHANGEMONEY
receiver=Beckians
amount=50
@ENDIF

@IF
CITYTAKEN
city=Giants' Castle
attacker=Beckians
defender=Orcs
@THEN
PLAYWAVEFILE
Mchnguns.wav
TEXT
As the once mighty fortress burns, you are approached by an
orcish warrior.  You draw your sword on instinct, but it 
drops its weapons, and starts grunting and moaning in the 
strange language of orcs.  Your knowledge of this complex 
speech is limited, but you gather that he is a lone warrior 
that is willing to join your cause -- for a price.
^
^"I fight for the highest bidder, and do it well."
[Klaw Swiftkill: 8/4/3, f2/h3, x4 move]
ENDTEXT
CREATEUNIT
unit=Klaw Swiftkill
owner=TRIGGERATTACKER
veteran=yes
homecity=Beckhorn
locations
71,193
endlocations
CHANGEMONEY
receiver=Beckians
amount=-100
JUSTONCE
@ENDIF

@IF
UNITKILLED
unit=Klaw Swiftkill
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Klaw Swiftkill Deserts!
^
^The orcish hero Klaw Swiftkill has abandoned our cause after receiving
a serious injury fighting.  The cowardly creature deserted despite having
won the trust of the people of Beckhorn.
ENDTEXT
@ENDIF

@IF
TURN
turn=46
@THEN
TEXT
^^Monastery Opens
^
^The holy master of unarmed combat, Brother Sven, has opened a new monastery
in the capital.  The monastery is devoted to teaching the poor people of 
Beckhorn how to protect themselves against monsters using only their bare hands.
The master of the Floating Crane style himself joins the king's cause.  "Swift
and strong is the way of the Crane."
^
^[Brother Sven: 11/8/3, f2/h4, x4 move, magic resistant]
ENDTEXT
CREATEUNIT
unit=Brother Sven
owner=Beckians
veteran=yes
homecity=NONE
locations
36,132
37,132
endlocations
GIVETECHNOLOGY
receiver=Beckians
technology=9
@ENDIF

@IF
UNITKILLED
unit=Brother Sven
attacker=ANYBODY
defender=Beckians
@THEN
TEXT
^^Brother Sven Succumbs to Wounds
^
^Brother Sven, master of the martial arts, has fallen in battle.  At the monastery his
disciples continue to teach the poor people of Beckhorn the basics of fighting
without weapons.
ENDTEXT
@ENDIF

@IF
CITYTAKEN
city=Tomb of Xerxes
attacker=Beckians
Defender=SPECIAL
@THEN
CHANGETERRAIN
terraintype=10
maprect
26,118,26,118,26,118,26,118
@ENDIF

@IF
CITYTAKEN
city=Money
attacker=Beckians
defender=SPECIAL
@THEN
CHANGETERRAIN
terraintype=10
maprect
67,25,67,25,67,25,67,25
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
TEXT
^^Orcish Armies Attack!
^
^Hordes of angry orcs are boiling from underground mines to attack our
helpless settlements.  Somehow a leader has united the Black Fist and
Tearing Maw clans for a simultaneous strike on our new holding and our
northern frontier!
ENDTEXT
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
70,94
71,95
72,96
73,97
74,98
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
71,95
72,96
73,97
74,98
70,94
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
72,96
73,97
74,98
70,94
71,95
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
73,97
74,98
70,94
71,95
72,96
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Ogre
owner=Orcs
veteran=yes
homecity=NONE
locations
74,98
70,94
71,95
72,96
73,97
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
47,115
45,115
47,117
46,118
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
45,115
47,117
46,118
47,115
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Ogre
owner=Orcs
veteran=yes
homecity=NONE
locations
47,117
46,118
47,115
45,115
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Orc
owner=Orcs
veteran=yes
homecity=NONE
locations
47,117
46,118
47,115
45,115
endlocations
@ENDIF

@IF
CITYTAKEN
city=Orcish Castle
attacker=Beckians
defender=Orcs
@THEN
CREATEUNIT
unit=Ogre
owner=Orcs
veteran=yes
homecity=NONE
locations
46,118
47,115
45,115
47,117
endlocations
@ENDIF

@IF
UNITKILLED
unit=Dragon
attacker=Beckians
defender=ANYBODY
@THEN
GIVETECHNOLOGY
technology=62
receiver=Beckians
TEXT
^^Great Dragon Defeated!
^
^The great dragon is slain!  People dance in the streets as money is
raised for a monument to the slayer of the dragon!  (Once you build
the monument, you will get +3 happy people in that city, and +1 happy
person in all other cities.)
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Dark Warrior
attacker=Beckians
defender=ANYBODY
@THEN
TEXT
^^Dark Warrior's Treasure Plundered!
^
^The dark warrior is slain!  Hidden in his lair, you find 250 gold!
ENDTEXT
CHANGEMONEY
receiver=Beckians
amount=250
@ENDIF

@IF
UNITKILLED
unit=Frost Giantess
attacker=Beckians
defender=ANYBODY
@THEN
TEXT
Congratulations!  The death of the Frost Giantess is a major blow to the orcish people!
ENDTEXT
@ENDIF

@IF
UNITKILLED
unit=Lich
attacker=Beckians
defender=Undead
@THEN
TEXT
^^Lich Lord Slain
^
^Ransacking her laboratory, our heroes discovered the secrets of the 
undead!  Necromancers can now animate skeleton lords should we decide
to use this foul ability.  Desperate times, desperate actions?
ENDTEXT
GIVETECHNOLOGY
receiver=Beckians
technology=3
@ENDIF

@IF
UNITKILLED
unit=Daemon
attacker=Beckians
defender=ANYBODY
@THEN
JUSTONCE
TEXT
^^Daemon Bound!
^
^We have managed to capture one of the great daemons in a magic 
circle.  It says that the Paladin-General of Westmark's sister is 
imprisoned!  "Persuasion" convinced the daemon to tell you where:  
"Travel Southwest from the Gateway to HELL, then turn to the 
Southeast at the intersection.  Look for a narrow bridge running 
across a lava chasm.  She can be found beyond that bridge."
ENDTEXT
@ENDIF

@ENDEVENTS
